import { EGameMode, EEnemy } from "./Enum";

export const ModeConfig = {
  [EGameMode.Normal]: "闯关模式，有限关隘，通关后可获得奖励",
  [EGameMode.Endless]: "无尽模式，关隘数越高，难度越高，奖励越丰厚",
  [EGameMode.Gold]: "铜钱模式，专注于获取铜钱和资源",
  [EGameMode.Pet]: "宠物模式，培养和使用宠物协助战斗",
  [EGameMode.Gem]: "宝石模式，收集和使用宝石提升能力",
  [EGameMode.Wood]: "木桩模式，练习和测试你的武学",
  [EGameMode.Boss]: "Boss挑战，面对强大的Boss敌人",
};

export const StageConfig = {
  [EGameMode.Normal]: {
    stage: {
      // ==========================================
      // 第一阶段：初出茅庐 (1-2 无Boss)
      // ==========================================
      1: {
        waves: [
          { enemies: { [EEnemy.Enemy1]: 50 } }, 
          { enemies: { [EEnemy.Enemy2]: 50 } }
        ]
      },
      2: {
        waves: [
          { enemies: { [EEnemy.Enemy2]: 5 } },
          { enemies: { [EEnemy.Enemy1]: 5, [EEnemy.Enemy3]: 5 } }
        ]
      },

      // ==========================================
      // 第二阶段：单Boss试炼 (3-9 每关1个Boss)
      // ==========================================
      3: {
        waves: [
          { enemies: { [EEnemy.Enemy10]: 8 } },
          { enemies: { [EEnemy.Enemy3]: 10, [EEnemy.Enemy10]: 5 } }
        ],
        bosses: [EEnemy.Boss1] // Boss1 先锋大将
      },
      4: {
        waves: [
          { enemies: { [EEnemy.Enemy1]: 15 } },
          { enemies: { [EEnemy.Enemy10]: 5, [EEnemy.Enemy20]: 5 } }
        ],
        bosses: [EEnemy.Boss1] // Boss1 返场
      },
      5: {
        waves: [
          { enemies: { [EEnemy.Enemy12]: 8, [EEnemy.Enemy20]: 6 } }, 
          { enemies: { [EEnemy.Enemy1]: 10, [EEnemy.Enemy12]: 5, [EEnemy.Enemy20]: 5 } }
        ],
        bosses: [EEnemy.Boss2] // Boss2 神箭哲别 (远程Boss初见)
      },
      6: {
        waves: [
          { enemies: { [EEnemy.Enemy11]: 10, [EEnemy.Enemy21]: 5 } }, 
          { enemies: { [EEnemy.Enemy11]: 10, [EEnemy.Enemy21]: 8 } }
        ],
        bosses: [EEnemy.Boss1] // Boss1
      },
      7: {
        waves: [
          { enemies: { [EEnemy.Enemy4]: 10 } }, 
          { enemies: { [EEnemy.Enemy4]: 10, [EEnemy.Enemy24]: 5 } } 
        ],
        bosses: [EEnemy.Boss2] // Boss2
      },
      8: {
        waves: [
          { enemies: { [EEnemy.Enemy13]: 10, [EEnemy.Enemy22]: 5 } }, 
          { enemies: { [EEnemy.Enemy13]: 15, [EEnemy.Enemy22]: 5 } }
        ],
        bosses: [EEnemy.Boss1] // Boss1
      },
      9: {
        waves: [
          { enemies: { [EEnemy.Enemy1]: 20, [EEnemy.Enemy2]: 10 } }, 
          { enemies: { [EEnemy.Enemy12]: 10, [EEnemy.Enemy4]: 10 } } 
        ],
        bosses: [EEnemy.Boss2] // Boss2
      },

      // ==========================================
      // 第三阶段：双Boss压制 (10-30 每关2个Boss)
      // ==========================================
      
      // 第10关：经典的 一近一远 组合
      10: {
        waves: [
          { enemies: { [EEnemy.Enemy11]: 10, [EEnemy.Enemy20]: 10 } },
          { enemies: { [EEnemy.Enemy11]: 10, [EEnemy.Enemy24]: 5 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss2] 
      },

      // 第11关：双先锋 (高血量检测)
      11: {
        waves: [
          { enemies: { [EEnemy.Enemy15]: 5 } }, 
          { enemies: { [EEnemy.Enemy15]: 5, [EEnemy.Enemy20]: 10 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss1]
      },

      // 第12关：双哲别 (弹幕地狱)
      12: {
        waves: [
          { enemies: { [EEnemy.Enemy3]: 15 } }, 
          { enemies: { [EEnemy.Enemy3]: 15, [EEnemy.Enemy12]: 10 } }
        ],
        bosses: [EEnemy.Boss2, EEnemy.Boss2]
      },
      
      // 第13关：先锋+哲别
      13: {
        waves: [
          { enemies: { [EEnemy.Enemy23]: 8 } }, 
          { enemies: { [EEnemy.Enemy23]: 10, [EEnemy.Enemy10]: 10 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss2]
      },

      // 第14关：先锋+哲别
      14: {
        waves: [
          { enemies: { [EEnemy.Enemy15]: 5, [EEnemy.Enemy22]: 5 } }, 
          { enemies: { [EEnemy.Enemy15]: 6, [EEnemy.Enemy22]: 6, [EEnemy.Enemy24]: 5 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss2]
      },
      
      // 第15关：引入 Boss3 攻城巨兽
      15: {
        waves: [
          { enemies: { [EEnemy.Enemy13]: 15, [EEnemy.Enemy23]: 5 } },
          { enemies: { [EEnemy.Enemy13]: 15, [EEnemy.Enemy23]: 10 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss3] // 先锋 + 巨兽 (极硬组合)
      },

      // 第16关：哲别 + 巨兽
      16: {
        waves: [
          { enemies: { [EEnemy.Enemy1]: 20, [EEnemy.Enemy11]: 10 } }, 
          { enemies: { [EEnemy.Enemy15]: 5, [EEnemy.Enemy3]: 10 } }
        ],
        bosses: [EEnemy.Boss2, EEnemy.Boss3]
      },

      // 第17关：双巨兽 (绝望之墙)
      17: {
        waves: [
          { enemies: { [EEnemy.Enemy2]: 15, [EEnemy.Enemy12]: 10, [EEnemy.Enemy4]: 10 } }, 
          { enemies: { [EEnemy.Enemy23]: 10, [EEnemy.Enemy24]: 5 } }
        ],
        bosses: [EEnemy.Boss3, EEnemy.Boss3]
      },
      
      // 第18关：先锋 + 哲别
      18: {
        waves: [
          { enemies: { [EEnemy.Enemy20]: 10, [EEnemy.Enemy24]: 10, [EEnemy.Enemy21]: 10 } }, 
          { enemies: { [EEnemy.Enemy15]: 8, [EEnemy.Enemy11]: 10 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss2]
      },

      // 第19关：巨兽 + 哲别
      19: {
        waves: [
          { enemies: { [EEnemy.Enemy15]: 8, [EEnemy.Enemy22]: 8, [EEnemy.Enemy23]: 8 } }, 
          { enemies: { [EEnemy.Enemy3]: 20 } }
        ],
        bosses: [EEnemy.Boss3, EEnemy.Boss2]
      },

      // 第20关：引入 Boss4 蒙哥大汗
      20: {
        waves: [
          { enemies: { [EEnemy.Enemy13]: 20 } },
          { enemies: { [EEnemy.Enemy15]: 10 } }
        ],
        bosses: [EEnemy.Boss1, EEnemy.Boss4] // 先锋 + 大汗
      },

      // 第21关
      21: { 
        waves: [{ enemies: { [EEnemy.Enemy1]: 40 } }, { enemies: { [EEnemy.Enemy15]: 10, [EEnemy.Enemy24]: 15 } }],
        bosses: [EEnemy.Boss2, EEnemy.Boss4] // 哲别 + 大汗
      },
      
      // 第22关
      22: { 
        waves: [{ enemies: { [EEnemy.Enemy12]: 30 } }, { enemies: { [EEnemy.Enemy3]: 20, [EEnemy.Enemy4]: 20 } }],
        bosses: [EEnemy.Boss3, EEnemy.Boss4] // 巨兽 + 大汗
      },
      
      // 第23关
      23: { 
        waves: [{ enemies: { [EEnemy.Enemy11]: 20, [EEnemy.Enemy10]: 20 } }, { enemies: { [EEnemy.Enemy21]: 25, [EEnemy.Enemy22]: 10 } }],
        bosses: [EEnemy.Boss4, EEnemy.Boss4] // 双大汗 (极难)
      },
      
      // 第24关
      24: { 
        waves: [{ enemies: { [EEnemy.Enemy15]: 15 } }, { enemies: { [EEnemy.Enemy23]: 20, [EEnemy.Enemy13]: 15 } }], 
        bosses: [EEnemy.Boss1, EEnemy.Boss3] // 回归肉盾组合，但数值更高
      },
      
      // 第25关
      25: { 
        waves: [{ enemies: { [EEnemy.Enemy1]: 60 } }, { enemies: { [EEnemy.Enemy3]: 30, [EEnemy.Enemy15]: 5 } }],
        bosses: [EEnemy.Boss2, EEnemy.Boss4] 
      },
      
      // 第26关
      26: { 
        waves: [{ enemies: { [EEnemy.Enemy15]: 20, [EEnemy.Enemy22]: 20 } }, { enemies: { [EEnemy.Enemy23]: 30 } }],
        bosses: [EEnemy.Boss3, EEnemy.Boss4]
      },
      
      // 第27关
      27: { 
        waves: [{ enemies: { [EEnemy.Enemy4]: 40 } }, { enemies: { [EEnemy.Enemy12]: 50 } }],
        bosses: [EEnemy.Boss2, EEnemy.Boss2] // 双哲别，满屏弹幕
      },
      
      // 第28关
      28: { 
        waves: [{ enemies: { [EEnemy.Enemy13]: 30 } }, { enemies: { [EEnemy.Enemy15]: 20, [EEnemy.Enemy24]: 20 } }],
        bosses: [EEnemy.Boss3, EEnemy.Boss3] // 双巨兽
      },
      
      // 第29关
      29: { 
        waves: [{ enemies: { [EEnemy.Enemy3]: 50 } }, { enemies: { [EEnemy.Enemy15]: 10, [EEnemy.Enemy23]: 10, [EEnemy.Enemy22]: 10, [EEnemy.Enemy13]: 10 } }],
        bosses: [EEnemy.Boss4, EEnemy.Boss4] // 双大汗
      },
      
      // 第30关：最终决战
      30: {
        waves: [
          { enemies: { [EEnemy.Enemy15]: 20, [EEnemy.Enemy13]: 20 } },
          { enemies: { [EEnemy.Enemy23]: 20, [EEnemy.Enemy3]: 30 } },
          { enemies: { [EEnemy.Enemy13]: 20, [EEnemy.Enemy12]: 20, [EEnemy.Enemy21]: 20 } }
        ],
        bosses: [EEnemy.Boss3, EEnemy.Boss4] // 巨兽 + 大汗 (终极配置)
      }
    }
  },
  
  [EGameMode.Gold]: {
    stage: {
      1: { waves: [{ enemies: { [EEnemy.Enemy_GoldCarriage]: 20 } }, { enemies: { [EEnemy.Enemy_GoldCarriage]: 20 } }] },
      2: { waves: [{ enemies: { [EEnemy.Enemy_GoldCarriage]: 30 } }, { enemies: { [EEnemy.Enemy_GoldCarriage]: 30 } }] },
    }
  }
};